package com.bd.scm.domain.models.role;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mason
 * @since 2021-01-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("bd_user_admin")
public class BdUserAdmin extends Model<BdUserAdmin> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    private Integer id;
    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;
    /**
     * 姓名
     */
    @TableField("real_name")
    private String realName;
    /**
     * 密码
     */
    private String password;
    /**
     * 联系电话
     */
    private String tel;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 员工ID
     */
    @TableField("employee_id")
    private Long employeeId;
    /**
     * 创建人ID
     */
    @TableField("create_id")
    private Integer createId;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createTime;
    /**
     * 最后更新人ID
     */
    @TableField("update_id")
    private Integer updateId;
    /**
     * 最后更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date updateTime;

    /**
     * 状态
     */
    private Integer status;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
